<?php

$smarty->configLoad($lang . '/votebanners.module.php');
$language = parse_ini_file($lang . '/breadcrumb.module.php', true);
$breadcrumb = $language['votebanners'];
if(isset($_POST['submit'])) {
	$main->logAction($_SESSION['id'], 'votebanners');
	$sql = 'INSERT INTO '.DB_CMS.'.module_votebanners (img, link, coins) VALUES (:img, :link, :coins)';
	$dbh = $connection->prepare($sql);
	$dbh->bindValue(':img', $_POST['img']);
	$dbh->bindValue(':link', $_POST['link']);
	$dbh->bindValue(':coins', $_POST['coins']);
	$dbh->execute();
	$main->jqmodal('addet');
	echo '<meta http-equiv="refresh" content="5; URL=index.php?mod=votebanners">';

}
$template = 'votebanners/add.tpl';
?>